<template>
  <div class="th3d">
    <iframe class="ifa" scrolling="auto" :src="iframeUrl" frameborder="0" />
  </div>
</template>

<script>
import { detailByCode } from '@neu/dcvm-ui/api/config'
import { getToken } from '@neu/biz-core/utils/auth'
export default {
  name: 'ThreeD',
  components: {
  },
  data() {
    return {
      iframeUrl: ''
    }
  },
  created() {
    detailByCode('3D_IFRAME_URL').then(response => {
      const url = response.data.data
      this.iframeUrl = url.replace(/\?.*/, '') + '?Authentication=' + getToken()
      // this.iframeUrl = 'http://10.1.5.247:8888/t/index.html?Authentication=eyJhbGciOiJIUzUxMiJ9.eyJhdWQiOiJhZG1pbiIsInJvbGVzIjpbIklEQyIsImFkbWluIl0sImV4cCI6MTY1NDg0MDE2Mn0.rtArw0Ju1BhHSesVkkYDbrhWg-gIMm6zjztZGjCxEzNv6lZBanbMVBdpyUAUQuJpvuHlfHGJEK9nSzI4L6SuOQ'
    })
  }
}
</script>
<style lang="scss" scoped>
  .th3d {
    margin-bottom: -3px;
  }
  .ifa {
    width: 100%;
    height: calc(100vh - 50px);
  }
</style>
